VmaxPhoto Applet

Designed as operator logo and picture messages composer for mobile phones, this applet privde end user with ability to edit images and submit result as JPG file to your web server with POST in the same way as standard browsers do file upload.

Plugin architecture of the applet provide flexible and simple interface for extendable functionality. Set of new painting tools, filters or effects can be added as plugins without changing applet itself.

Skinnable design allows easy adoptation of the applet outlook to almost any site desing.

Author: (Virtual Max) .
======================================================================================== Example: ======================================================================================== <APPLET CODE=vmaxphoto.VMaxPhoto.class WIDTH=464 HEIGHT=434> <param name="IMAGE" value="zooki2.jpg"> <param name="SKIN" value="skin2.gif"> <param name="BGCOLOR" value="AFD2E4"> <param name="CANVAS" value="4 4 399 297 "> <param name="OPTIONS" value="4 306 399 105 "> <param name="TIP" value="4 413 399 16 "> <param name="TOOL0" value="Undo 408 5 23 23 dependent | Undo "> <param name="TOOL1" value="Redo 435 5 23 23 dependent | Redo "> <param name="TOOL2" value="Pencil 408 33 23 23 dependent | Pencil "> <param name="TOOL3" value="Line 435 33 23 23 dependent | Line "> <param name="TOOL4" value="Rect 408 61 23 23 dependent | Rectangle "> <param name="TOOL5" value="Fill 435 61 23 23 dependent | Rectangle "> <param name="TOOL6" value="Selection 408 89 23 23 dependent | Selection "> <param name="TOOL7" value="Drag 435 89 23 23 dependent | Drag selection "> <param name="TOOL8" value="Text 408 117 23 23 dependent | Text "> <param name="TOOL9" value="Framer 408 145 51 23 dependent | Frame your photo "> <param name="TOOL10" value="Filter 408 173 51 23 dependent | Filters "> <param name="TOOL11" value="ColorSelector 408 277 51 25 dependent | Select color "> <param name="TOOL12" value="Send 408 385 51 25 | Send "> <param name="FILTER0" value="BrightnessContrast | Adjust Brightness/Contrast"> <param name="FILTER1" value="ColorBalance | Adjust RGB values"> <param name="FILTER2" value="Blur | Blur "> <param name="FILTER3" value="Emboss | Emboss "> <param name="FILTER4" value="Bevel | Bevel "> <param name="FILTER5" value="Spherize | Spherize "> <param name="FILTER6" value="Rotate | Rotate "> <param name="FILTER7" value="Riple | Riple "> <param name="FRAME0" value="frames/frame1.gif 20 16 | sample 1"> <param name="FRAME1" value="frames/frame2.gif 20 16 | sample 2"> <param name="FRAME2" value="frames/frame3.gif 20 16 | sample 3"> <param name="POSTURL" value="/cgi-bin/gate.cgi"> <param name="DATAPARAMNAME" value="DATA"> <param name="ADDPARAMNAME0" value="name0"> <param name="ADDPARAMVALUE0" value="value0"> </APPLET> ======================================================================================== PARAMETERS DESCRIPTION ======================================================================================== <param name="IMAGE" value="zooki2.jpg"> URL of image to edit in relative form, relative to applet codebase directory. Required. <param name="SKIN" value="skin2.gif"> URL of Applet skin image, relative to applet codebase. Must be GIF and should have buttons pictograms transparent. Applet paints highlight rectangle under buttons locations then overlay skin, thus doing mouseover effects Required. <param name="BGCOLOR" value="AFD2E4"> HEX value in RRGGBB format of background color for standard AWT components like options panel elements and help tip label. (Same format as HTML hex colors but WITHOUT # radix symbol) Required. Components ---------- <param name="CANVAS" value="4 4 399 297 "> <param name="OPTIONS" value="4 306 399 105 "> <param name="TIP" value="4 413 399 16 "> Painting canvas, options panel and tip label. In common 4 tokens in parameter value is component positioning X,Y,WIDTH,HEIGHT Required. Tools ------ <param name="TOOL0" value="Undo 408 5 23 23 dependent | Undo "> <param name="TOOL1" value="Redo 435 5 23 23 dependent | Redo "> <param name="TOOL2" value="Pencil 408 33 23 23 dependent | Pencil "> <param name="TOOL3" value="Line 435 33 23 23 dependent | Line "> ....... Tools parameters MUST be enumerated from 0 to N without any missed numbers Parameter value consists of ToolClassName X Y W H [group] [| help text] (where [ ] means optional token) ToolClassName - java class filename in package vmaxphoto.tools which implement tool functionaity X Y W H - location and sizes of tool button group - optional group name for radio like dependent buttons help text - Help text to show in tip label onmouse over button When present, MUST be separated from previous tokens with | char. Optional parameters, one can configure only required tools Filters -------- <param name="FILTER0" value="BrightnessContrast | Adjust Brightness/Contrast"> <param name="FILTER1" value="ColorBalance | Adjust RGB values"> <param name="FILTER2" value="Blur | Blur "> ..... Filters parameters MUST be enumerated from 0 to N without any missed numbers Parameter value consists of 2 tokens separated with | character. FilterClassName - java class name from package vmaxphoto.plugins which implements required plugin functionality Filter Name for pulldown list - Name to put into filter selector pull down list Must be unique! Optional parameters, one can configure only required filters Frames ------- <param name="FRAME0" value="frames/frame1.gif 20 16 | sample 1"> <param name="FRAME1" value="frames/frame2.gif 20 16 | sample 2"> <param name="FRAME2" value="frames/frame3.gif 20 16 | sample 3"> Frames parameters MUST be enumerated from 0 to N without any missed numbers Frame parameter value consists of frame image URL (relative to codebase), FrameWidth, fit offset and framename as it appears in select. Frame must be 80x80 transparent gif image. Applet entirely cut this image in 8 patterns: 4 corner patterns with dimensions of given FrameWidth * FrameWidth and 4 borderpatterns with dimensions 80-2*FrameWidth * FrameWidth While framing corner parterns are drawn as is in corners of selecttion area, borderpatterns are tiled closest integer times to fit between selection corners. Border patterns will be rescaled in one dimension to fit integer number of times. Optional parameters, one can configure only required filters, But at least one frame parameter required when Framer tool is configured. Fit offset token is used to rescale original image inside frame. POST parameters ---------------- <param name="POSTURL" value="/cgi-bin/gate.cgi"> <param name="DATAPARAMNAME" value="DATA"> <param name="ADDPARAMNAME0" value="name0"> <param name="ADDPARAMVALUE0" value="value0"> POSTURL - URL of serverside script to do POST of imagedata. (relative to codebase) in response server must return single line of text containing URL of page to load after POST done. required. DATAPARAMNAME - name of POST parameter containing image data. Image data will be posted as BASE64 encoded data of JPEG image. Serverside script should first decode base64 data then treat result as JPEG image bytes. required. ADDPARAMNAME0 ADDPARAMVALUE0 - 0 to N enumerated name/value pairs of additional parameters to be passed to server within the same POST operation Optional, can be used for session tracking, e.t.c ========================================================================================